﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Fluent;
using WINADM.Data;

namespace WINADM.Client
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : RibbonWindow
    {
        IEntityRepository _entityRepository;
        public MainWindow()
        {
            InitializeComponent();
            this._entityRepository = new WINADMEntities();
        }

        private void RibbonWindow_Loaded(object sender, RoutedEventArgs e)
        {
            this.DataContext = Applications;
        }

        public IList<Data.Application> Applications
        {
            get
                {
                    var apps = from app in _entityRepository.Applications select app;
                    return apps.ToList<Data.Application>();
                }
        }
    }
}
